from appium.webdriver.common.mobileby import MobileBy

from lagou.appium_exercise4.pages.base_page import BasePage


class DeleteMemberPage(BasePage):
    del_ele = (MobileBy.XPATH, "//*[@text='删除成员']")
    confirm_ele = (MobileBy.XPATH, "//*[@text='确定']")
    def click_delete_member(self):
        # 点击删除成员
        self.swipe_find_and_click(*self.del_ele)
        # 点击弹窗中的确认
        self.find_and_click(*self.confirm_ele)
        # 返回通讯录成员列表
        from lagou.appium_exercise4.pages.address_list_page import AddressListPage
        return AddressListPage(self.driver)